package com.xcdh.orm.controller;

import com.xcdh.commons.controller.BaseController;
import com.xcdh.domain.vo.R;
import com.xcdh.orm.entity.OrmDataSource;
import com.xcdh.orm.service.DcmsDataSourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * DcmsDataSourceController
 * Created by wjg on 2023/12/5.
 */
@RestController
@RequestMapping("/dsConfig")
public class DcmsDataSourceController extends BaseController<OrmDataSource , DcmsDataSourceService> {

    @Autowired
    private DcmsDataSourceService dcmsDataSourceService ;

    @PostMapping("/insertDataSource")
    public R insertDataSource(@RequestBody OrmDataSource dataSource){
        dcmsDataSourceService.insertDataSource(dataSource);
        return R.ok() ;
    }
}
